home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / MPW Oberon 2.1168 / OInterfaces / Signal.mod < prev    next >
Encoding:
Text File  |  1995-08-24  |  1.2 KB  |  60 lines  |  [TEXT/MPS ]

  1.  
  2. (*
  3. Created: Friday, August 2, 1991 at 11:40 PM
  4.  Signal.p
  5.  Pascal Interface to the Macintosh Libraries
  6.  
  7.     Signal Handling interface.
  8.     This must be compatible with C's <signal.h>
  9.  
  10.   Copyright Apple Computer, Inc. 1986, 1987, 1988, 1991, 1994
  11.   All rights reserved
  12. *)
  13.  
  14.  
  15. (*$TAGS-*)
  16. (*$CALLING PASCAL*)
  17. MODULE Signal;
  18.  
  19. IMPORT SYSTEM;
  20.  
  21. (* $ALIGN MAC68K*)
  22.  
  23.  
  24. TYPE
  25.     SignalMap* =     INTEGER;
  26.     (* Signal handlers actually have a single parameters of type LONGINT *)
  27.     (* it is not supported in Oberon since the MPW Shell uses the C calling *)
  28.     (* convention that is not supported by MPW Oberon. *)
  29.     SignalHandler* = PROCEDURE (*ΔΔ POINTER TO LONGINT*);    (* Pointer to function *)
  30.  
  31. CONST
  32.     SIG_ERR* =       -1;            (* Returned by IEsignal on error *)
  33.     SIG_IGN* =        0;
  34.     SIG_DFL* =        1;
  35.     SIG_HOLD* =        3;
  36.     SIG_RELEASE* =    5;
  37.  
  38.     SIGABRT* =        $0001;
  39.     SIGINT* =        $0002;        (* Currently only SIGINT implemented *)
  40.     SIGFPE* =         $0004;
  41.     SIGILL* =        $0008;
  42.     SIGSEGV* =        $0010;
  43.     SIGTERM* =        $0020;
  44.  
  45. (* Signal Handling Functions *)
  46.  
  47. PROCEDURE
  48.     IEsignal*(sigNum: LONGINT; sigHdlr: (*ΔΔUNIVΔΔ*) SignalHandler):
  49.     SignalHandler; (*ΔΔC;ΔΔ*)
  50.     EXTERNAL (*•• C*);
  51.  
  52. PROCEDURE
  53.     IEraise*(sigNum: LONGINT):
  54.     LONGINT; (*ΔΔC;ΔΔ*)
  55.     EXTERNAL (*•• C*);
  56.  
  57. (* $ALIGN RESET*)
  58.  
  59.  END Signal.
  60.